package com.easyjava.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * @Author: 小闹心
 * @Description: JSON工具类
 * @DateTime: 2024/11/16 14:49
 **/
public class JsonUtils {

    public static String convertObj2Json(Object obj){
        if(obj == null){
            return null;
        }
        return JSON.toJSONString(obj, SerializerFeature.DisableCircularReferenceDetect);
    }
}
